// Learn cc.Class:
//  - [Chinese] http://www.cocos.com/docs/creator/scripting/class.html
//  - [English] http://www.cocos2d-x.org/docs/editors_and_tools/creator-chapters/scripting/class/index.html
// Learn Attribute:
//  - [Chinese] http://www.cocos.com/docs/creator/scripting/reference/attributes.html
//  - [English] http://www.cocos2d-x.org/docs/editors_and_tools/creator-chapters/scripting/reference/attributes/index.html
// Learn life-cycle callbacks:
//  - [Chinese] http://www.cocos.com/docs/creator/scripting/life-cycle-callbacks.html
//  - [English] http://www.cocos2d-x.org/docs/editors_and_tools/creator-chapters/scripting/life-cycle-callbacks/index.html

/*
* 协议共用界面
*/
cc.Class({
    extends: cc.Component,

    properties: {
        labTop: cc.Label,  //标题
        labDec: cc.Label,  //内容
        _title: null,
        _str: null,

    },

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {},

    start () {
        //显示内容
        this.labTop.string = this._title;
        this.labDec.string = this._str;

    },

    init: function(title,str){
        this._title = title;
        this._str = str;
    },

    onClose:function(){
        this.node.getComponent("Page").backAndRemove();
    },

    // update (dt) {},
});
